import java.util.*;

public class FindefiniteEquations {
    public static void main(String[] args) {
        int a,b,c,cnt=0;
        Scanner input=new Scanner(System.in);
        a=input.nextInt();
        b=input.nextInt();
        c=input.nextInt();
        for (int x = 0; x <=c/a; x++) {
            if((c-a*x)%b==0)
                cnt++;
        }
        System.out.println(cnt);
    }
}